<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AlterCouponOrderAddOrderCreateTime extends Migrator
{
    public function up()
    {
        $this->table('coupon_order')
            ->addColumn('order_created_at','datetime', ['default' =>'CURRENT_TIMESTAMP','comment'=>"订单创建时间（可能第三方）"])
            ->save();
    }

    public function down()
    {
        $this->table('coupon_order')
            ->removeColumn('order_created_at');
    }
}
